

cmake_minimum_required(VERSION 3.4.1)

set(CMAKE_CXX_FLAGS "-std=c++11")

#设置第三方库头文件位置
#add_library(rtmp STATIC IMPORTED)
#set_target_properties(rtmp PROPERTIES IMPORTED_LOCATION    ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/librtmp.a)

#引入指定目录下的CMakeLists.txt
add_subdirectory(src/main/cpp/librtmp)

#指定头文件查找路径
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/librtmp)

add_library(rtmp_jni
        SHARED
        src/main/cpp/rtmp_jni.cpp)

find_library(log-lib log)



target_link_libraries(rtmp_jni ${log-lib} rtmp)
